package com.mao.other;

import java.util.ArrayList;

/**
 * @author Totoro
 * @date 2020/6/29
 * @explain:
 */
public class cc {
    public static void main(String[] args) {
        ArrayList<Integer> integers = new ArrayList<>();
        integers.add(1);
        integers.add(2);
        integers.add(null);
        System.out.println(integers.toString());


        String s = "[1,2,3,null,null,4,5]";
        String[] split;
        split = s.split(",|(\\[)|(\\])");
        for (String s1 : split) {
            System.out.println("'"+s1+"'");
            if (s1.equals("")) System.out.println("空串");
        }

        String substring = s.substring(1, s.length() - 1);
        System.out.println(substring);
        String[] split1 = substring.split(",");


        System.out.println(split.length);

        throw new IllegalArgumentException();
    }
}
